﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace QLACQUY
{
    public partial class UC_TrinhBaySanPham : UserControl
    {
        private string _imageName;
        private double _donGiaLe;
        private double _donGiaSy;
        private int _maSP;
        private string _moTa;
        private string _nhaSanXuat;
        private string _quyCach;
        public string QuyCach
        {
            get { return _quyCach; }
            set { _quyCach = value; }
        }
        public int MaSP
        {
            get { return _maSP; }
            set { _maSP = value; }
        }
        
        public string NhaSanXuat
        {
            get { return _nhaSanXuat; }
            set { _nhaSanXuat = value; }
        }
        
        public string MoTa
        {
            get { return _moTa; }
            set { _moTa = value; }
        }

        public string ImageName
        {
            get { return _imageName; }
            set { _imageName = value; }
        }
        
        public double DonGiaSy
        {
            get { return _donGiaSy; }
            set { _donGiaSy = value; }
        }
        
        public double DonGiaLe
        {
            get { return _donGiaLe; }
            set { _donGiaLe = value; }
        }
       
        public UC_TrinhBaySanPham()
        {
            InitializeComponent();
            _imageName = "";
            _donGiaLe = 0;
            _donGiaSy = 0;
        }

        private void UC_TrinhBaySanPham_Load(object sender, EventArgs e)
        {
            
            picBox.ImageLocation = Global.appFolder + _imageName;//_imagePath;
            lbGiaLe.Text = _donGiaLe.ToString();
            lbGiaSy.Text = _donGiaSy.ToString();
            lbNhaSanXuat.Text = _nhaSanXuat;
            toolTip1.SetToolTip(this, MoTa);//_moTa);
            lbQuyCach.Text = _quyCach;
            
        }
        public void setCheck(bool c)
        {
            ckChon.Checked = c;
        }
        public bool getCheck()
        {
            return ckChon.Checked;
        }
        public string getSelectedPrice()
        {
            if (rdGiaLe.Checked)
            {
                return lbGiaLe.Text;
            }
            return lbGiaSy.Text;
        }
    }
}
